/**
 * user模块接口列表
 */
import axios from '@/utils/http';//导入http中创建的axios实例

const user = {
    login(params) {
        return axios.post(`/Users/Login`, params)
    },
    getUserList(params) {
        return axios.post(`/Users/getUserList`, params)
    },
    getPermissions() {
        return axios.get(`/Permissions/GetPermissions`)
    },
    addUser(params) {
        return axios.post(`/Users/PostUser`, params)
    },
    editUser(params) {
        return axios.post(`/Users/PutUser`, params)
    },
    deleteUser(Id) {
        return axios.post(`/Users/DeleteUser?Id=` + Id)
    },
    editPermission(Id, PermissionId) {
        return axios.post(`/Users/EditPermission?Id=` +
            Id +
            "&&PermissionId=" +
            PermissionId)
    }
}

export default user;
